#ifndef LIST_H
#define LIST_H
#include<stdlib.h>
#include<assert.h>
#include<stdio.h>

typedef int DE;

struct List{
	DE *pdatas;
	int ilength;
	int isize;
};

typedef DE* position;

struct List create(int isize);

void clear(struct List *plist1);
void destroy(struct List *plist);
struct List copy(struct List slist);
int empty(struct List list);
int length(struct List list);
position positionbegin(struct List list);
position positionend(struct List list);
position nextposition(struct List list,position pos);
position locateposition(struct List list,int i);
position locateelem(struct List list,DE e);
DE getelem(struct List list,position pos);
void setelem(struct List list,position pos,DE e);
int insertbefore(struct List *plist,position pos,DE e);
void Delete(struct List*plist,position pos);
void Print( struct List list );
#endif
